<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "book".
 *
 * @property integer $id
 * @property string $title
 * @property integer $create_time
 * @property string $author
 * @property string $socure
 */
class Book extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'book';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['create_time'], 'integer'],
            [['title'], 'string', 'max' => 30],
            [['id','category'], 'string', 'max' => 36],
            [['author', 'socure'], 'string', 'max' => 50],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'title' => '书名',
            'category' => '类别',
            'create_time' => '收录时间',
            'author' => '作者',
            'socure' => '来源网站',
        ];
    }
}
